package com.next.muscu.data;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Level implements Comparable<Level>, MyDataObject, Serializable {
	private static final String PP_ID = "id";
	private static final String PP_NAME = "name";

	private Integer id;
	public Level() {
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		Integer old = this.id;

		this.id = id;
		ppChangeSupport.firePropertyChange(PP_ID, old, this.id );
	}

	private String name;

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		String old = this.name;

		this.name = name;
		ppChangeSupport.firePropertyChange(PP_NAME, old, this.name );
	}

	private Set<Step> setSteps = new HashSet<Step>(0);
	public Set<Step> getSetSteps() {
		return setSteps;
	}
	public void setSetSteps(Set<Step> setSteps) {
		this.setSteps = setSteps;
	}

	private Set<ExecutionDateTemplate> setEDTs = new HashSet<ExecutionDateTemplate>(0);
	public Set<ExecutionDateTemplate> getSetEDTs() {
		return setEDTs;
	}
	public void setSetEDTs(Set<ExecutionDateTemplate> setEDTs) {
		this.setEDTs = setEDTs;
	}
	
	@Override
	public boolean copy(MyDataObject o) {
		return false;
	}

	@Override
	public int compareTo(Level arg0) {
		return 0;
	}

	@Override
	public void Create() {

	}
	// Listener methods
	PropertyChangeSupport ppChangeSupport = new PropertyChangeSupport(this);

	@Override
	public void addPropertyChangeListener(PropertyChangeListener listener) {
		ppChangeSupport.addPropertyChangeListener(listener);
	}

	@Override
	public void addPropertyChangeListener(String propertyName,
			PropertyChangeListener listener) {
		ppChangeSupport.addPropertyChangeListener(propertyName, listener);
	}

	@Override
	public PropertyChangeListener[] getPropertyChangeListeners() {
		return ppChangeSupport.getPropertyChangeListeners();
	}

	@Override
	public PropertyChangeListener[] getPropertyChangeListeners(
			String propertyName) {
		return ppChangeSupport.getPropertyChangeListeners(propertyName);
	}

	@Override
	public void removePropertyChangeListener(PropertyChangeListener listener) {
		ppChangeSupport.removePropertyChangeListener(listener);
	}

	@Override
	public void removePropertyChangeListener(String propertyName,
			PropertyChangeListener listener) {
		ppChangeSupport.removePropertyChangeListener(propertyName, listener);
	}


}
